package org.testis.testdriver;

import java.util.HashMap;

/**
 *
 * @author barisergun
 */
public class TestStepGlobalDataHashMap {
    
    private static TestStepGlobalDataHashMap m_currentmap;
    private HashMap<String,String> m_teststepglobals;
    private TestStepGlobalDataHashMap()
    {
        m_teststepglobals = new HashMap<String, String>();
    }
    
    public static TestStepGlobalDataHashMap createInstance()
    {
        if (m_currentmap == null) {
            m_currentmap = new TestStepGlobalDataHashMap();
        }

        return m_currentmap;
    }
    public void addNewKeyValueToList(String key, String value)
    {
        m_teststepglobals.put(key,
                              value);
    }
    public void putAllKeyValues(HashMap<String, String> entry)
    {
        m_teststepglobals.putAll(entry);
    }
    public void clearAllKeyValues()
    {
        m_teststepglobals.clear();
    }
    public String getValue(String key)
    {
        return m_teststepglobals.get(key);
    }

    public HashMap<String, String> getTeststepglobals() {
        return m_teststepglobals;
    }


}
